/****** Object:  Stored Procedure dbo.spr_UpdateExDBVisaEntryByPK  ******/

 use [TourIS]
 GO

 if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[spr_UpdateExDBVisaEntryByPK]') and OBJECTPROPERTY(id, N'IsProcedure') = 1)
 drop procedure [dbo].[spr_UpdateExDBVisaEntryByPK]
 GO

 SET QUOTED_IDENTIFIER OFF
 GO
 SET ANSI_NULLS OFF
 GO

 CREATE  PROCEDURE [dbo].[spr_UpdateExDBVisaEntryByPK]
 (
	@entrydate smalldatetime,
	@exitdate smalldatetime,
	@remarks varchar(100),
	@orig_srno int,
	@srno int,
	@visaid int
 )

 AS

 BEGIN
	SET NOCOUNT ON
	DECLARE @Err int

	UPDATE [VisaEntry]
	SET
		[EntryDate] = @entrydate,
		[ExitDate] = @exitdate,
		[Remarks] = @remarks,
		[SrNo] = @srno,
		[VisaID] = @visaid

	WHERE
	[SrNo] = @orig_srno


	SET @Err = @@Error
	RETURN @Err
 END

 SET QUOTED_IDENTIFIER OFF
 GO
 SET ANSI_NULLS ON
 GO

